package cn.melonlib.nars.action.model.entity;

import cn.melonlib.cores.commons.model.entity.TenantRecordEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Type;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("共享资源")
@Entity(name = "ShareNames")
@Table(name = "nars_share_names")
public class ShareNames extends TenantRecordEntity {

    @ModelComment("路径")
    @Column@Lob@Basic(fetch = FetchType.LAZY)@Type(type = "org.hibernate.type.TextType")
    private String path;

    @ModelComment("共享资源ID")
    private String namesId;

    @ModelComment("过期时间")
    private Long expire=0L;

    @ModelComment("公开的，不需要登陆")
    private Boolean disclosure=false;

    @ModelComment("提取码，如果为空则不需要提取码")
    private String extractCode;

}
